ergmformula <- paste("~", paste(ego.terms,collapse="+"),sep="") # Establish function ergm formula that includes the ego.terms object
obs.S<-list() #obs.S list that will be useful for the below for loop
print("Calculating all network statistics...") 
for (i in 1:N) # for loop started
  {
  #obs.S[[i]]<-ergmMPLE(as.formula(paste("x[[i]]",ergmformula)),output="array") # pseudolikelihood change stats
  obs.S[[i]]<-ergmMPLE(as.formula(paste("x[[i]]",ergmformula))) # pseudolikelihood change stats
  obs.S[[i]]$offset<-ergm.offset[i] # for each observation term i, include an offset term in that vector
  }

